//
//  CObject.h
//  Monster_Martial_Arts_Version_0
//
//  Created by bk on 13/1/6.
//  Copyright (c) 2013年 __MyCompanyName__. All rights reserved.
//

#ifndef Monster_Martial_Arts_Version_0_CObject_h
#define Monster_Martial_Arts_Version_0_CObject_h

#include "BattleDef.h"
#include "cocos2d.h"

using namespace MMA;
using namespace cocos2d;

struct OBJECT_DATA
{
    int nLv;
    int nMaxHp;
    int nHP;
    int nAttack;
    int nDefend;
    int nMoveSpeed;
    int nAttackSpeed;
    int nExp;
    int nSize;
};

class CObject
{
public:
    
    CObject();
    virtual ~CObject(){}
    
    //virtual bool Init(CCNode*) = 0;
    
    virtual void Update(CCNode* , float dTime)=0;
    
    virtual void Release(CCNode*)=0;
    
    //OBJECT_DATA&  GetObjectData(){return m_data;}
    
    inline  int  GetMoveSpeed();//{return m_data.nMoveSpeed;}
    
    inline  int  GetHP();
    
    inline  int  GetMaxHP();
    
protected:
    
    OBJECT_DATA m_data;
};


int CObject::GetHP()
{
    return m_data.nHP;
}

int CObject::GetMaxHP()
{
    return m_data.nMaxHp;
}

int CObject::GetMoveSpeed()
{
    return m_data.nMoveSpeed;
}

#endif
